(function (lib, config) {
    var loadFunc = function () {
        var textAry = config.words.split('|'), bgcolorAry = config.bgcolor.split('|'), textcolorAry = config.textcolor.split('|'), imglinkAry = config.imglink.split('|'), identiAry = config.identifier.split('|');
        textAry[0] = textAry[0] || '您好，请问您的身体不适_<font color=\'#ff0000\'>持续时间</font>有多久了？';
        textAry[1] = textAry[1] || '<=3天';
        textAry[2] = textAry[2] || '>3天';
        textAry[3] = textAry[3] || '不知道';
        textcolorAry[0] = textcolorAry[0] || '#333';
        textcolorAry[1] = textcolorAry[1] || '#333';
        textcolorAry[2] = textcolorAry[2] || '#333';
        textcolorAry[3] = textcolorAry[3] || '#333';
        bgcolorAry[0] = bgcolorAry[0] || '#5ba4ed';
        bgcolorAry[1] = bgcolorAry[1] || '#fff';
        bgcolorAry[2] = bgcolorAry[2] || '#5ba4ed';
        imglinkAry[0] = imglinkAry[0] || 'http://nanke.lzcj120.com/swt/swt20180525/img/wechat.png';
        imglinkAry[1] = imglinkAry[1] || 'http://nanke.lzcj120.com/swt/swt20180525/img/foubg.gif';
        imglinkAry[2] = imglinkAry[2] || 'http://nanke.lzcj120.com/swt/swt20180525/img/shibg.gif';
        imglinkAry[3] = imglinkAry[3] || 'http://nanke.lzcj120.com/swt/swt20180525/img/zjtx.jpg';
        identiAry[0] = identiAry[0] || 'dibu0525';
        var htmlStr = [];
        htmlStr.push("<style type=\'text/css\'>");/*left:0;bottom:0;*/
        htmlStr.push(".wb{ position:fixed;min-width:100%;"+lib.util.getPosStyle(config)+";z-index:99999999;}");
        htmlStr.push(".float_container1{display:none;max-width:640px;width:100%;margin:0 auto;background:" + 'fff' + ";}");
        htmlStr.push(".cf{zoom:1;}");
        htmlStr.push(".cf:before, .cf:after{display:block;content:\'\';}");
        htmlStr.push(".cf:after{clear:both;}");
        htmlStr.push(".swtdb{display:block}");
        htmlStr.push(".float_container1 dl{margin:0;background:" + bgcolorAry[0] + "}");
        htmlStr.push(".float_container1 dt{display:inline-block;float:left;margin:10px 0 0 4%;text-align:center;width:10%;}");
        htmlStr.push(".float_container1 dt img{max-width:100%;border:0;vertical-align:middle;-ms-interpolation-mode:bicubic;border-radius:50%;}");
        htmlStr.push(".float_container1 dd{margin:0;display:inline-block;position:relative;width:80%;float:left;margin-left:3%}");
        htmlStr.push(".float_container1 .box1 {border-radius:10px;background:" + bgcolorAry[1] + ";color:" + textcolorAry[0] + ";font-size:0.7em;line-height:1.65em;text-align:left;position:relative;margin-left:3%;padding:0.5em;margin-top:3%}");
        htmlStr.push(".float_container1 .box1 p{margin:0;}");
        htmlStr.push(".float_container1 .box1:before{content:\'\';position:absolute;top:1%;left:-20px;width:20px;height:20px;background:url(" + imglinkAry[0] + ") no-repeat scroll 0 -200px;transform:rotate(-180deg);}");
        htmlStr.push(".float_container1 .btns{background:" + bgcolorAry[2] + ";padding:5px 0;overflow:hidden;padding-left:23%}");
        htmlStr.push(".float_container1 .btns a{display:inline-block;width:25%;float:left;margin:0 3%;font-size:0.7em;color:" + textcolorAry[1] + ";text-align:center;text-decoration:none;transition:all .3s linear 0s;}");
        htmlStr.push(".fou{background:url(" + imglinkAry[1] + ");color:" + '#333' + ";width:35%;border-radius:20px;float:left;font-size:0.7em;line-height:2em}");
        htmlStr.push(".shi{margin-left:5%;background:url(" + imglinkAry[2] + ");color:" + textcolorAry[1] + ";width:35%;border-radius:20px;float:left;font-size:0.7em;line-height:2em}");
        htmlStr.push("@media screen and (min-width:320px){#swt_bottom{font-size:14px}}");
        htmlStr.push("@media screen and (min-width:360px){#swt_bottom{font-size:16px}}");
        htmlStr.push("@media screen and (min-width:400px){#swt_bottom{font-size:18px}}");
        htmlStr.push("@media screen and (min-width:440px){#swt_bottom{font-size:20px}}");
        htmlStr.push("@media screen and (min-width:481px){#swt_bottom{font-size:22px}}");
        htmlStr.push("@media screen and (min-width:640px){#swt_bottom{font-size:28px}}");
        htmlStr.push("</style>");
        htmlStr.push("<div class=\'wb\' id=\'swt_bottom\'>");
        htmlStr.push("  <div id=\'footTool1\' class=\'float_container1\'>");
        htmlStr.push("    <dl class=\'cf\'>");
        htmlStr.push("      <dt><img src=\'" + imglinkAry[3] + "\'></dt>");
        htmlStr.push("      <dd><div class=\'box1\'><p>" + textAry[0] + "</p></div></dd>");
        htmlStr.push("    </dl>");
        htmlStr.push("    <div class=\'btns cf\'><a href=\'javascript:void(0);\' onClick=\'openZoosUrl(\"\",\"&e=" + identiAry[0] + "\");\' class=\'shi\'>" + textAry[1] + "</a><a href=\'javascript:void(0);\' onClick=\'openZoosUrl(\"\",\"&e=" + identiAry[0] + "\");\' class=\'shi\' style='color:" + textcolorAry[2] + ";'> " + textAry[2] + "</a><a href=\'javascript:void(0);\' onClick=\'openZoosUrl(\"\",\"&e=" + identiAry[0] + "\");\' class=\'fou\' style='color:" + textcolorAry[3] + ";'> " + textAry[3] + "</a></div>");
        htmlStr.push("  </div>");
        htmlStr.push("</div>");
        var o = document.createElement('div');
        o.innerHTML = htmlStr.join('');
        while (o.firstElementChild) {
            document.body.appendChild(o.firstElementChild);
        };

        var footTool1 = document.getElementById("footTool1");
        var swt_bottom = document.getElementById("swt_bottom");
        setTimeout(toolshow, 0);
        function toolshow() {
            footTool1.className = "float_container1 swtdb cf";
        }
        /***抖动***/
        mfx = function (isWin) {
            var t = 3, z = 1, del = function () { clearInterval(mfx.ID); return mfx };
            del().ID = setInterval(function () {
                var i = t / 180 * Math.PI, x = Math.sin(i) * z, y = Math.cos(i) * z, s = swt_bottom.style;
                isWin ? window.moveBy(x, y) : (s.bottom = x + 'px', s.left = y + 'px');
                if ((t += 90) > 1080) del();
            }, 30);
        }
        window.setInterval("mfx()", config.firsttime * 1000);
    };
    lib.load(loadFunc);/*执行代码*/
})('{{lib}}', '{{config}}');